<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ page import="be.ac.ua.ecampus.uacmat.entity.*, java.util.Collection" %>
<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
	<title>Search</title>
	<link rel="stylesheet" type="text/css" href="style.css"/>
</head>

<body>
<header>
	<h1>Search</h1>
</header>

<div id="body-wrapper">
	<h2>Result</h2>
	
		<% final Collection<Syllabus> syllabuses = (Collection<Syllabus>) request.getAttribute("syllabuses"); %>
		<% if ((syllabuses != null) && (!syllabuses.isEmpty())) { %>
			<h3>Syllabuses</h3>
			<ul>
			<% for (final Syllabus result : syllabuses) { %>
	       		<li>
	        		<a href="/uacmat/show?type=<%= result.getType() %>&id=<%= result.getId() %>"><%= result.getDescription() %></a>
	        	</li>
	    	<% }%>
	    	</ul>
	   	<% }%>
	    
	   	<% final Collection<Course> courses = (Collection<Course>) request.getAttribute("courses"); %>
	  	<% if ((courses != null) && (!courses.isEmpty())) { %>
	   		<h3>Courses</h3>
	   		<ul>
			<% for (final Course result : courses) { %>
	        	<li>
	        		<a href="/uacmat/show?type=<%= result.getType() %>&id=<%= result.getId() %>"><%= result.getDescription() %></a>
	        	</li>
	    	<% } %>
	    	</ul>
	    <% } %>
	    
	   	<% final Collection<Program> programs = (Collection<Program>) request.getAttribute("programs"); %>
	    <% if ((programs != null) && (!programs.isEmpty())) { %>
	   		<h3>Programs</h3>
	   		<ul>
			<% for (final Program result : programs) { %>
	        	<li>
	        		<a href="/uacmat/show?type=<%= result.getType() %>&id=<%= result.getId() %>"><%= result.getDescription() %></a>
	        	</li>
	    	<% } %>
	    	</ul>
	    <% } %>
	
</div>
</body>
</html>